PROTOBUFCODE= lspmessage.pb-c.c lspmessage.pb-c.h

all:
	g++ -w worker.c -o worker sha1.cpp brute_force.cpp lsp_client.c lspmessage.pb-c.c -lpthread -lprotobuf-c
	g++ -w request.c -o request lsp_client.c lspmessage.pb-c.c -lpthread -lprotobuf-c
	g++ -w server.c -o server CrackRequest.cpp Block.cpp lsp_server.c lspmessage.pb-c.c -lpthread -lprotobuf-c

worker:
	g++ -w worker.c -o worker sha1.cpp brute_force.cpp lsp_client.c lspmessage.pb-c.c -lpthread -lprotobuf-c

request:
	g++ -w request.c -o request lsp_client.c lspmessage.pb-c.c -lpthread -lprotobuf-c

server:
	g++ -w server.c -o server CrackRequest.cpp Block.cpp lsp_server.c lspmessage.pb-c.c -lpthread -lprotobuf-c

testlsp:
	g++ -w lsp_server_test.c -o lsp_server_test lsp_server.c lspmessage.pb-c.c -lpthread -lprotobuf-c
	g++ -w lsp_client_test.c -o lsp_client_test lsp_client.c lspmessage.pb-c.c -lpthread -lprotobuf-c

clean:
	rm -rf *.o
	rm -rf *.gch
	rm -rf *.out

fullclean:
	rm -rf *.o
	rm -rf $(PROTOBUFCODE)
	rm -rf *.gch
	rm -rf *.out
